fc77dd66744ab6f1c16e8c0752666aac01a8bdad,components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpRouteTest.java,HttpRouteTest,testPutParameterInURI,#,140
Before Change
StringEntity entity = new StringEntity(POST_MESSAGE, "UTF-8");
entity.setContentType("application/xml" + HTTP.CHARSET_PARAM + "UTF-8");
put.setEntity(entity);
HttpResponse httpResponse = client.execute(put);
InputStream response = httpResponse.getEntity().getContent();
String out = context.getTypeConverter().convertTo(String.class, response);
assertEquals("Get a wrong output ", "PutParameter", out);
}
After Change
PutMethod put = new PutMethod("http://localhost:9080/parameter?request=PutParameter&others=bloggs");
StringRequestEntity entity = new StringRequestEntity(POST_MESSAGE, "application/xml", "UTF-8");
put.setRequestEntity(entity);
client.executeMethod(put);
InputStream response = put.getResponseBodyAsStream();
String out = context.getTypeConverter().convertTo(String.class, response);
assertEquals("Get a wrong output " , "PutParameter", out);
}